cmake_minimum_required(VERSION 3.22)
project(eventHub)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

include_directories(
        src/utils
        src/core/ipc
        src/core/plugin
)

add_library(EventCore SHARED
        src/utils/Log.cpp
        src/core/ipc/Message.cpp
        src/core/ipc/IPCStrategyLocal.cpp
        src/core/plugin/BasePlugin.cpp
        src/core/plugin/TimerPlugin.cpp
        src/core/plugin/PluginManager.cpp
        src/core/plugin/PluginWrapper.cpp
        src/core/plugin/PluginLoader.cpp)

add_executable(eventHub src/main.cpp)
target_link_libraries(eventHub PRIVATE
        EventCore
)

add_library(PluginHot SHARED
        src/plugins/HotPlugin.cpp
)
target_link_libraries(PluginHot PRIVATE
        EventCore
)
